package com.augurit.gzcgwsp.smartformCsdlwj.service;

import java.util.List;
import java.util.Map;

import javax.servlet.http.HttpServletRequest;

import org.springside.modules.orm.Page;

import com.augurit.common.base.service.ICrudService;
import com.augurit.common.system.web.auth.form.LoginUserForm;
import com.augurit.common.system.web.org.form.OmUserForm;
import com.augurit.gzcgwsp.smartformCsdlwj.entity.YwHwShljqs;
import com.augurit.gzcgwsp.smartformCsdlwj.web.form.ShljqsForm;
import com.augurit.wf.bi.web.form.WfBusInstanceTaskForm;



public interface ISmartFormShljqsService extends ICrudService<ShljqsForm, Long> {

    /**
     * sql查询出生活垃圾清扫表的集合
     * @param id
     * @return
     */
    public List getListById(Long id);
    
    //获取公厕拆除案件集合
    public List<YwHwShljqs> getByAcceptNo(String acceptNo);

    /**
     * 查询受理日期
     * @param id
     * @param fileCode
     * @param tempId
     * @return
     */
	public String getSlrq(Long id, String fileCode, Long tempId);
	
	/**
	 * 保存证书
	 * @param form
	 * @param tablename
	 */
	public void doUpdate(ShljqsForm form,String tablename);
	
	/**
     * 保存副本
     * @param form
     * @param string
     */
	public void doUpdateFb(ShljqsForm form, String tablename);
	
	/**
	 * 查询form
	 * @param id
	 * @param tablename
	 * @return
	 */
	public ShljqsForm getForm(Long id,String tablename);
	/**
	 * 打印写数据
	 * @param form
	 * @param context
	 * @param inpath
	 * @return
	 */
	public String writeXkzData(ShljqsForm form, String context,String inpath);

	/**
	 * 打印写入数据
	 * @param form
	 * @param context
	 * @param inpath
	 * @return
	 */
	public String writeFbData(ShljqsForm form, String context, String inpath);
	
	/**
	 * 获取收件通知书里面的材料列表
	 * @param form
	 * @return
	 */
	public ShljqsForm getSjtzsField(ShljqsForm form);

	/**
	 * 反射设置属性
	 * @param form
	 */
	public void reSetForm(ShljqsForm form);
    
    /**
     * 导入前检查文件是否存在
     * @param templateCode
     * @param filename
     * @param id
     * @param qyid
     * @return
     */
	public boolean checkData(String templateCode, String filename, Long id,
			Long qyid);
	
	/**
	 * 导入
	 * @param form
	 * @param map
	 * @return
	 */
	public String importData(ShljqsForm form, Map map);
	/**
	 * 生成证书编号
	 * @param tablename
	 * @return
	 */
	public String createZsbh(Map map,Long id);
	
	/**
	 * 待办出证数据
	 * @param page
	 * @return
	 */
	public Page<ShljqsForm> getDbData(Page<ShljqsForm> page,Map map);
	
	//自动启动流程
	public void autoStartProc(ShljqsForm form,String templateCode);

	/**
	 * 获取待办的所有数据
	 * @param map
	 * @return
	 */
	public List<Object[]> getDbDatas(Map map);
	
	/**
	 * 保存
	 * @param request
	 * @param form
	 * @param map
	 * @param username
	 * @return
	 */
	public WfBusInstanceTaskForm wfBusSave(HttpServletRequest request,
			ShljqsForm form, Map map, OmUserForm userForm);
	public String wfBusYslTuih(ShljqsForm form,LoginUserForm loginUser) throws Exception;
	public void changeYslState(Long id,Long state,String yslThyy);
	

	/**
	 * 获取案件的区域
	 */
	public String getArea(ShljqsForm form);
	
	/**
     * 保存延期和告知
     * @param map 
     */
	public void saveOherInfo(Map map);
	
	/**
	 * 保存收件通知书材料
	 * @return
	 * @throws Exception
	 */
	public String saveSjtzs(String [] checkedIds,String context,ShljqsForm form,LoginUserForm userName) throws Exception;
	/**
	 * 打印收件通知书
	 * @param inpath
	 * @param tempOutPath
	 * @param context
	 * @param ywComSjcllistForm
	 */
	public String printSjtzs(String context,ShljqsForm form,LoginUserForm user,List<Map<String,String>> list);
}